package cc.yugu.yhdw.webserver.biz.client;

import cc.yugu.yhdw.common.entity.RespBody;
import cc.yugu.yhdw.common.protocol.msg05.Msg052000003;
import io.netty.channel.ChannelHandlerContext;
import org.springframework.stereotype.Component;

import java.util.Map;
/**
 * 通过客户端协议工具类对协议052000003处理
 * Component ：产生bean，也即将该类注解成spring的bean工厂中一个一个的bean
 *
 * @Date:Created in 2018/6/27 9:11
 * @Author:
 * @Modified By: zjn 2018/6/27 9:11
 */
@Component
public class Biz052000003 extends AbstractBiz {
    /**
    * 重写dobiz方法
    * @Param: [context, attributes, message]
    * @Return: void
    * @Author By: zjn 2018/6/27  9:20
    */
    @Override
    public void doBiz(ChannelHandlerContext context, Map<String, Object> attributes, Object message) throws Exception {
        Msg052000003 msg = (Msg052000003) message;
        RespBody<Msg052000003> respBody = ClientBizUtils.respBodyPool.get(msg.getSerial());
        if(respBody != null) {
            respBody.setBody(msg);
        }
    }

}
